#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Setup script for Basic Voice Module
基础语音模块安装脚本
"""

from setuptools import setup, find_packages
from pathlib import Path

# 读取README文件
this_directory = Path(__file__).parent.parent
long_description = (this_directory / "README.md").read_text(encoding='utf-8')

# 读取requirements文件
requirements = []
requirements_file = this_directory / "requirements.txt"
if requirements_file.exists():
    with open(requirements_file, 'r', encoding='utf-8') as f:
        requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')]

setup(
    name="basic-voice-module",
    version="1.2.0",
    author="YAHBOOM | Gentle Xu",
    author_email="voice@example.com",
    description="Basic voice module with wake detection, recording, and playback",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/example/basic-voice-module",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Topic :: Multimedia :: Sound/Audio",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    python_requires=">=3.7",
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest>=6.0",
            "pytest-cov>=2.0",
            "black>=21.0",
            "flake8>=3.8",
        ],
    },
    include_package_data=True,
    package_data={
        "basic_voice_module": [
            "config/*.yaml",
            "docs/*.md",
            "examples/*.py",
        ],
    },
    entry_points={
        "console_scripts": [
            "voice-test=basic_voice_module.test_import:main",
        ],
    },
    zip_safe=False,
)